package com.yzh.opp4;

/**
 * @author 于振晗
 * @title: Canteen
 * @description: TODO 食堂类
 * @date 2020年08月26日
 * @path com.yzh.oop3
 */
public class Canteen {
    public static Programmer getProgrammer(String type){
        Programmer pro;
        if("en".equals(type)){
            pro = new English();
        }else{
            pro = new Chinese();
        }

        return pro;

    }

    public static void main(String[] args) {
        Programmer it = Canteen.getProgrammer("en");
        it.eat();
    }
}
